import React,{ useState } from 'react';
import store from '../base/index'
import ReactReduxSimplify from "@/views/redux/example/reactReduxSimplify.tsx";
import ReduxToolkit from "@/views/redux/example/reduxToolkit.tsx";
const Base = () => {
    // const [name,setName] = useState(store.getState().contral.name);
    // const handleClick = () => {
    //     store.dispatch({ type: 'contral/edit', payload: 1,name: '安慕吸',count: 10  })
    // }
    //
    // store.subscribe(() => {
    //         setName(store.getState().contral.name)
    //     }
    // )
    return (
        <>
            {/*<h1>Base Page</h1>*/}
            {/*<pre>{name}{store.getState().count}</pre>*/}
            {/*<button onClick={handleClick}>Click me</button>*/}
            {/*<hr/>*/}
            {/*<hr/>*/}
            {/*<hr/>*/}

            {/*<h1>react-redux 简化redux 的操作</h1>*/}
            {/*<ReactReduxSimplify/>*/}
            {/*<hr/>*/}
            {/*<hr/>*/}
            {/*<hr/>*/}
            <h1>redux-toolkit 的使用</h1>
            <ReduxToolkit/>
        </>
    );
};

export default Base;